import {getExamCertificate} from "@/apis/common/statics";

/** 图形验证码类型 */
export interface ImageCaptchaResp {
  uuid: string
  img: string
  expireTime: number
}

/** 仪表盘公告类型 */
export interface DashboardNoticeResp {
  id: number
  title: string
  type: number
}

/** 仪表盘访问趋势类型 */
export interface DashboardAccessTrendResp {
  date: string
  pvCount: number
  ipCount: number
}

/** 仪表盘通用总览类型 */
export interface DashboardOverviewCommonResp {
  total: number
  today: number
  growth: number
  dataList: DashboardChartCommonResp[]
}

/** 仪表盘通用图表类型 */
export interface DashboardChartCommonResp {
  name: string
  value: number
}

/* 行为验证码类型 */
export interface BehaviorCaptchaResp {
  originalImageBase64: string
  point: {
    x: number
    y: number
  }
  jigsawImageBase64: string
  token: string
  secretKey: string
  wordList: string[]
}

export interface BehaviorCaptchaReq {
  captchaType?: string
  captchaVerification?: string
  clientUid?: string
}

export interface CheckBehaviorCaptchaResp {
  repCode: string
  repMsg: string
}


/** 統計數據 */
export interface StatisticsData {
  channelCount: number
  proxyUserCount: number
  customerCount: number
  orderCount: number
}

/** 商家統計數據 */
export interface StatisticsMchData {
  settledAmount: number
  unSettledAmount: number
  orderAmount: number
  orderCount: number
}


/** 时段数据分析 */
export interface TimePeriodAnalysisData {
  studyTimeData: any[]
  timeData: any[]
  perPractices: any[]
  perStudies: any[]
}


/** 商家端排行統計 */
export interface MchStudyRank {
  totalStudyTime: number
  weekStudyTime: number
  peopleAvgStudyTime: number

  totalStrStudyTime: string
  weekStrStudyTime: string
  peopleStrAvgStudyTime: string
  currentWeekRank: any[]
  totalStudyRank: any[]
}


/** 商家端排行統計 */
export interface MchExamRank {
  totalExamTime: number
  passExamCount: number
  avgScore: number
  passRate: string
  examRanks: any[]
}


/** 商家端用戶學習統計 */
export interface MchUserStudyStatistic {
  totalStudyTime: number
  weekStudyTime: number
  totalPracticeTime: number
  weekPracticeTime: number
  totalStrStudyTime: string
  weekStrStudyTime: string
  totalStrPracticeTime: string
  weekStrPracticeTime: string
  totalExamTime: number
  passExamCount: number
  passRate: string
  avgScore: number
}

export interface checkExamCertificateDto {
  unitId: string
  unitTitle: string
  unitOrder: number
  doMainId: string
  doMainName: string
  doMainType: string
  whetherExamPass: boolean
  totalScore: number
  customerScore: number
  identityCode: string
  userHeadImage: string
  realName: string
  createTime: Date
}

